import requests
session = requests.session()
esp_code = session.get("http://tpshop-test.itheima.net/index.php?m=Home&c=User&a=verify")
login_url = "http://tpshop-test.itheima.net/index.php?m=Home&c=User&a=do_login5"
login_header = {"Content-Type": "application/x-www-form-urlencoded"}
login_body = {"username": "17788888888", "password": "123456", "verify_code": "8888"}
resp_login = session.post(url=login_url, headers=login_header, data=login_body)
print("resp_login=", resp_login.json())